![]() |
PBCompareFSRefsAsync |
||||
Header: | Files.h | Carbon status: | Supported | |
Determines whether two FSRefs refer to the same file or directory.
void PBCompareFSRefsAsync ( FSRefParam *paramBlock );
A pointer to a parameter block
The relevant fields of the parameter block are:
On input, a pointer to a completion routine.
On output, the result code of the function. If the two FSRefs refer to the same file or directory, then noErr is returned. If they refer to objects on different volumes, then diffVolErr is returned. If they refer to different files or directories on the same volume, then errFSRefsDifferent is returned. This call may return other errors, including nsvErr, fnfErr, dirNFErr, and volOffLinErr.
On input, a pointer to the first FSRef (ref1 in the high-level function, FSCompareFSRefs).
On input, a pointer to the second FSRef (ref2 in the high-level function, FSCompareFSRefs).
You must use one of the three functions FSCompareFSRefs, PBCompareFSRefsAsync, or PBCompareFSRefsSync, to compare FSRefs. It is not possible to compare the FSRef structures directly since some bytes may be uninitialized, case-insensitive text, or contain hint information.
Some volume formats may be able to tell that two FSRefs would refer to two different files or directories, without having to actually find those objects. In this case, the volume format may return errFSRefsDifferent even if one or both objects no longer exist. Similarly, if the FSRefs are for objects on different volumes, the File Manager will return diffVolErr even if one or both volumes are no longer mounted.
Supported in Carbon. Available in Mac OS 9, and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)